package oopday03.Test03;

//圆柱体类Cylinder
public class Cylinder extends Circle {
    private double hight;

    public Cylinder(double r, double hight) {
        super(r);
        this.hight = hight;
    }

    public Cylinder() {

    }

    public double getVolume() {
        return getArea() * hight;
    }

    public void showVolume() {
        System.out.println("圆柱体的体积为：" + getVolume());
    }
}
